package com.ruoyi.system.dubbo;

import com.ruoyi.system.api.RemoteTBsCalendarService;
import com.ruoyi.system.api.domain.TBsCalendar;
import com.ruoyi.system.domain.bo.TBsCalendarBo;
import com.ruoyi.system.service.ITBsCalendarService;
import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

@RequiredArgsConstructor
@Service
@DubboService
public class RemoteTBsCalendarServiceImpl implements RemoteTBsCalendarService {

    private final ITBsCalendarService tBsCalendarService;

    @Override
    public TBsCalendar selectTBsCalendarByNatureday(String dateEight) {
        TBsCalendarBo tBsCalendarBo = new TBsCalendarBo();
        tBsCalendarBo.setNatureday(dateEight);
        return tBsCalendarService.query(tBsCalendarBo);
    }

    @Override
    public TBsCalendar getLastWorkDay(String dateEight) {
        return tBsCalendarService.getLastWorkDay(dateEight);
    }
}
